The method of responding in kind is among the educational methods used in the Quran. It means acting toward others in the same way that they act toward you.
The logic of the Quran, of course, is not to do the same to those who use bad language against us, but to greet them, avoid quarreling with them and remain indifferent to their behavior.
However, there are a few cases in which, we are recommended by the Quran and Hadith to act in kind in order to prevent aggressors and those who reject the truth from getting emboldened.
God says in the Holy Quran: “If any one aggresses against you, so aggress against him with the likeness of that which he has aggressed against you. Fear Allah, and know that Allah is with the cautious.” (Verse 194 of Surah Al-Baqarah)
When confronted with people who were stubborn and refused to accept the truth no matter what, the divine prophets used the method of responding in kind so that the obstinacy and arrogance of these individuals could be broken and their souls awakened.
Of course, this was not the method that messengers of God used in dealing with all such people. Aggressors and those rejecting the truth can be divided into two groups: Those who deny the truth out of ignorance and those who are ill-wishing enemies that act based on plotting and ill intentions.
In facing the first group, one should exercise patience and tolerance. As for the second group, however, one should use the method of acting in kind.
This is the method used by Moses (AS) in the face of pharaoh. Moses (AS) was tasked with beginning the invitation to God with pharaoh. So he went to pharaoh:
“To Moses We gave nine clear signs. Ask the Children of Israel about how he came to them. When Pharaoh said to him: ‘Moses, I think you are bewitched.’” (Verse 101 of Surah Al-Isra)
In reaction to pharaoh’s insult, Moses (AS) responds in kind and says: “Certainly you have come to know that these have been sent by the Lord of the heavens and the earth as lessons to people. Pharaoh, I believe that you are doomed to perdition.” (Verse 102 of Surah Al-Isra)
Moses (AS) tells pharaoh that he knows well these are clear signs from God and because he is denying these signs, he is doomed to destruction.